Use tolist() : import numpy as np >>> np.array([[1,2,3],[4,5,6]]).tolist() [[1, 2, 3], [4, 5, 6]]. Note that this converts the values from ... ... <看更多>
As a quick example, consider computing the sum of all values in an array. Python itself can do this using the built-in sum function: In [1]:. ... <看更多>